package com.kevin.util.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class ListFieldList extends BodyTagSupport {
	/** 
	 * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
	*/ 
	
	private static final long serialVersionUID = -2683517740672185705L;
	String var = null;

	public String getVar() {
		return var;
	}

	public void setVar(String var) {
		this.var = var;
	}

	@Override
	public int doStartTag() throws JspException {
		// TODO Auto-generated method stub
		return EVAL_BODY_BUFFERED;
	}

	@Override
	public int doAfterBody() throws JspException {
		// TODO Auto-generated method stub
		BodyContent body = getBodyContent();		
		String content = body.getString();
		body.clearBody();
		content = content.toUpperCase();
		pageContext.setAttribute(var, content);
		return SKIP_BODY;
	}
	
	
	

}
